<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

    <h:form id="menuForm">
        <p:accordionPanel dynamic="true">
            <p:tab title="Home">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;">  
                    <p:menuitem value="Inicio" url="#{request.contextPath}/index.jsf" icon="ui-icon-gear" />
                </p:menu>
            </p:tab>
            <p:tab title="Cadastros" rendered="#{!loginBean.exibirMenu('O')}">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;">
                    <p:menuitem value="Produtos" url="#{request.contextPath}/produto/produto.jsf" icon="ui-icon-gear" />
                    <p:menuitem value="Funcionários" url="#{request.contextPath}/funcionario/funcionario.jsf" icon="ui-icon-gear"  /> 
                    <p:menuitem value="Fornecedores" url="#{request.contextPath}/fornecedor/fornecedor.jsf" icon="ui-icon-gear"  /> 
                    <p:menuitem value="Clientes" url="#{request.contextPath}/cliente/cliente.jsf" icon="ui-icon-gear" />
                    <p:menuitem value="Grupos/Sub-Grupos" url="#{request.contextPath}/grupo/grupo.jsf" icon="ui-icon-gear" />
                    <p:menuitem value="Aliquotas de ICMS" url="#{request.contextPath}/aliquota/aliquota.jsf" icon="ui-icon-gear" />
                    <p:menuitem value="Caixas" url="#{request.contextPath}/caixa/caixa.jsf" icon="ui-icon-gear" />
                </p:menu>
            </p:tab>
            <p:tab title="Pré-venda" rendered="#{loginBean.exibirMenu('D')}">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;"> 
                    <p:menuitem value="Pré-Venda" url="#{request.contextPath}/pre-venda/pre-venda.jsf" icon="ui-icon-gear"/>
                </p:menu>
            </p:tab>
            <p:tab title="Configuração" rendered="#{loginBean.exibirMenu('D')}">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;"> 
                    <p:menuitem value="Configuração de caixas" url="#{request.contextPath}/config/configura.jsf" icon="ui-icon-gear"/>
                    <p:menuitem value="Impressoras" url="#{request.contextPath}/impressora/impressora.jsf" icon="ui-icon-gear"/>
                    <p:menuitem value="Empresas" url="#{request.contextPath}/empresa/empresa.jsf" icon="ui-icon-gear"/>
                </p:menu>
            </p:tab>
            <p:tab title="Entrada de Nota Fiscal" rendered="#{loginBean.exibirMenu('D')}">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;"> 
                    <p:menuitem value="Nota Fiscal de Entrada" url="#{request.contextPath}/NF_Entrada/NF_Entrada.jsf" icon="ui-icon-gear"/>
                    <p:menuitem value="Relatório de Entrada" url="#{request.contextPath}/NF_Entrada/RelNotas.jsf" icon="ui-icon-gear"/> 
                </p:menu>
            </p:tab>
            <p:tab title="Vendas">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;"> 
                     <p:menuitem value="Vendas" url="#{request.contextPath}/venda/venda.jsf" icon="ui-icon-gear"/> 
                </p:menu>
            </p:tab>
            <p:tab title="Nota Fiscal">
                <p:menu style="width: 200px; margin: 0px 0px 0px -20px;"> 
                     <p:menuitem value="Notas emitidas" url="#{request.contextPath}/nfe/nfe.jsf" icon="ui-icon-gear"/> 
                     <p:menuitem value="Nova nota" url="#{request.contextPath}/nfe/addNota.jsf" icon="ui-icon-gear"/> 
                </p:menu>
            </p:tab>
        </p:accordionPanel>
    </h:form>
</html>